Is there any equivalence of `--depth immediates` in `git`?

Posted by ??? on Super User See other posts from Super User or by ???
Published on 2011-01-03T07:11:25Z Indexed on 2011/01/03 7:55 UTC
Read the original article Hit count: 127

Filed under:
|

Currently, I'm try to setup git front-end to the Subversion repository.

My Subversion repository is a single large repository which consists of several co-related projects:

svn-root
  |-- project1
  |   |-- branches
  |   |-- tags
  |   `-- trunk
  |-- project2
  |   |-- branches
  |   |-- tags
  |   `-- trunk
  `-- project3
      |-- branches
      |-- tags
      `-- trunk

Because it's sometimes needs to move files between different projects, so I don't want to break the repository to separate ones.

I'm going to use git-svn to setup a git front-end, but I don't see how to exactly mapping the svn to git structure. The two systems treat branches and tags very different and I doubt it is possible.

To simplify the problem, I would just git svn clone the whole root directory and let branches/tags/trunk directories just sit there. But this will definitely result in too many files in branches and tags directories. In Subversion, it's easy to just set the depth of checkout to immediates, which will only checkout the branch/tag titles, without the directory contents. but I don't know if this can be done in git.

The git-svn messed me up. I hope there's more elegant solution.

© Super User or respective owner

Related posts about svn

Related posts about git